package edu.hawaii.myisern.action;

import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.RedirectResolution;

/**
 * Logout action interface for web.
 * 
 * @author Ed Kim
 * @author Jon Lao
 * @author JianFei Liao
 * @author Jared Sunouchi
 */
public class LogoutActionBean extends MyIsernActionBean {
    
  /**
   * Logs the user out by invalidating the session.
   *
   * @return resolution of the action, login page in this case.
   */
  public Resolution logout() {
     getContext().getRequest().getSession().invalidate();
     return new RedirectResolution("/index.jsp");
  }
  
}
